package ua.kpi.ipsa.expert.api.net;

//
import java.io.Serializable;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;
import java.util.Map;

/**
 * 
 * @author doctorpro
 * 
 */
public interface UsersConsole extends Serializable, Remote {

	public static final String ID = "id";
	public static final String NAME = "name";
	public static final String GROUP = "group";
	public static final String VOOZ = "vooz";
	public static final String ETC = "etc";

	public static final int ALL_USERS_PORTIONS = 1;
	public static final int MY_PORTIONS = 2;

	/**
	 * 
	 * @param bytes
	 * @param fullClassName
	 * @throws RemoteException
	 */
	public void postClassFile(byte[] bytes, String fullClassName)
			throws RemoteException, ConsoleException;

	/**
	 * 
	 * @param properties
	 * @param sourceList
	 * @return primary key of the created portion
	 * @throws RemoteException
	 */
	public int postCodePortion(String studName, String group, String vooz,
			String etc, List<SourceFile> sourceList) throws RemoteException,
			ConsoleException;

	/**
	 * 
	 * @param portionId
	 * @param algorithmId
	 * @return
	 * @throws RemoteException
	 */
	public List<PlagiarismHypo> getPortionScore(int portionId, int algorithmId)
			throws RemoteException, ConsoleException;

	/**
	 * 
	 * @param portionId
	 * @return
	 * @throws RemoteException
	 */
	public List<Integer> getAppointedAlgorithmSet(int portionId)
			throws RemoteException, ConsoleException;

	/**
	 * 
	 * @param portionId
	 * @param algorithmId
	 * @throws RemoteException
	 */
	public void postAlgorithmAppointment(int portionId, int algorithmId)
			throws RemoteException, ConsoleException;

	/**
	 * 
	 * @param algorithmId
	 * @return
	 * @throws RemoteException
	 */
	public String getAlgorithmPrintableName(int algorithmId)
			throws RemoteException, ConsoleException;

	/**
	 * 
	 * @param fullClassName
	 * @throws RemoteException
	 */
	public void postNewAlgorithm(String fullClassName) throws RemoteException,
			ConsoleException;

	/**
	 * 
	 * @param algorithmId
	 * @throws RemoteException
	 */
	public void removeAlgorithm(int algorithmId) throws RemoteException,
			ConsoleException;

	/**
	 * Method releases this console example
	 * 
	 * @throws RemoteException
	 */
	public void releaseConsole() throws RemoteException, ConsoleException;

	/**
	 * 
	 * @return
	 * @throws RemoteException
	 * @throws ConsoleException
	 */
	public boolean isEnabled() throws RemoteException;

	/**
	 * 
	 * @param id
	 * @param name
	 * @param group
	 * @param vooz
	 * @param etc
	 * @return
	 * @throws RemoteException
	 */
	public List<CPSummaryData> getCodePortionSummaryData(int id, String name,
			String group, String vooz, String etc) throws RemoteException;

	/**
	 * 
	 * @param id
	 * @return
	 * @throws RemoteException
	 */
	public List<CPAlgoSummaryData> getCPAlgoSummaryData(int id)
			throws RemoteException;

	/**
	 * 
	 * @param codePortionID
	 * @return
	 * @throws RemoteException
	 */
	public List<Algorithm> getAvaivableAlgorithms(int codePortionID)
			throws RemoteException;

	public CodePortion getCodePortion(int codePortionPK)
			throws RemoteException, ConsoleException;

	void postUserAgreement(int hypoPK, int userOpinion) throws RemoteException,
			ConsoleException;
}